<extend name="Public/base" />

<block name="body">
	<link href="__STATIC__/bootstrap/css/bootstrap.css" rel="stylesheet">
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>{$meta_title}</h2>
	</div>
    
    <div class="container-fluid">
    <div class="row">
    	<label>
			<button class="btn btn-return" onclick="location='{:U('ScoreSheet/index?score_id='.$_scoreId)}'">返 回</button>
           	<button class="btn ajax-post confirm" url="{:U('sheet_add?method=add&score_id='.$_scoreId)}" target-form="ids">添加</button>
    	</label>
    	<form class="form-inline" style="display:inline;" method="post" action="{:U('sheet_add')}" role="form" id="search-form">
    		<div class="form-group">
                <input type="text" class="form-control search_input" name="name" placeholder="曲谱名称" value="{$_condition['name']}"/>
				<input type="hidden" name="score_id" value="{$_scoreId}">
				<button type="button" class="btn btn-link" id="search">
              		<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                </button>
    		</div>
    	</form>
    </div>
    
    <div class="row">
    	<div class="div_10"></div>
    </div>
    
    <!-- 数据列表 -->
    <div class="row">
	<table class="table">
    <thead>
        <tr>
		<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
		<th class="">ID</th>
		<th class="">曲谱名称</th>
		<th class="">歌曲名</th>
		<th class="">歌手名</th>
		<th class="">状态</th>
		<th class="">标签列表</th>
		<th class="">曲谱作者</th>
		<th class="">创建时间</th>
		</tr>
    </thead>
    <tbody>
		<notempty name="_list">
		<volist name="_list" id="vo">
		<tr>
            <td>
				<in name="vo.id" value="$sheetIds">
					<span class="glyphicon glyphicon-ok"></span>
				<else/>
					<input class="ids" type="checkbox" name="id[]" value="{$vo.id}" />
				</in>
			</td>
            <td>{$vo.id} </td>
			<td><a id="sheet" onclick="sheet_detail('{:U('Sheet/detail?id='.$vo['id'])}')">{$vo.name}</a></td>
			<td>{$vo.song_name}</td>
			<td><span>{$vo.singer}</span></td>
			<td>{$vo.status_name}</td>
			<td>{$vo.tags}</td>
			<td>{$vo.creator_name}</td>
			<td>{$vo.create_time}</td>
		</tr>
		</volist>
		<else/>
		<td colspan="9" class="text-center"> aOh! 暂时还没有内容! </td>
		</notempty>
	</tbody>
    </table>
	</div>
    <div class="page">
        {$_page}
    </div>
    </div>
</block>

<block name="script">
	<script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
	<script src="__STATIC__/bootstrap-select/js/bootstrap-select.min.js"></script>
	<script src="__STATIC__/layer/layer.js"></script>
	<script type="text/javascript">

	//搜索功能
	$("#search").click(function(){
		$("#search-form").submit();
	});
	//回车搜索
	$(".search_input").keyup(function(e){
		if(e.keyCode === 13){
			$("#search").click();
			return false;
		}
	});
	
    //导航高亮
    highlight_subnav('{:U('Score/index')}');
    $(function(){
    	
    });
	</script>
</block>
